<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core">
	
	  <h:head>
	  	<title>::...:::..TEMPPOS..:::...::</title>
	  </h:head>
	  <h:body>
	  	<h:form id="fromulario_listagem_setor" prependId="false">
	  		<h:messages />
	  		
	  		<h:commandLink value="Cadastrar Novo Registro" action="#{setorController.novoController()}"/>
		  		<br />
		  		<br />
	  		<h:dataTable id="datatable_setor" value="#{setorController.setorDao.listarSetor}" var="_listar_setor" border="1" frame="box" rules="all" cellpadding="3">
	  			
	  			<!-- <h:column>
					<f:facet name="header">Código</f:facet>
					<h:outputLabel value="#{_listar_setor.codigo}"/>
				</h:column>	 -->
				
				<h:column>
					<f:facet name="header">Nome</f:facet>
					<h:outputLabel value="#{_listar_setor.nome}"/>
				</h:column>
				
				<h:column>
					<f:facet name="header">Alterar</f:facet>
					<h:commandLink value="Alterar" action="#{setorController.alterarController(_listar_setor)}"/>
				</h:column>
				
				<h:column>
					<f:facet name="header">Excluir</f:facet>
					<h:commandLink value="Excluir" action="#{setorController.excluirController(_listar_setor)}" onclick="if(!confirm('Deseja realmente Excluir esse Setor?')) return false"/>
				</h:column>	
					  		
	  		</h:dataTable>
	  		
	  	</h:form>
	  </h:body>
</html>
